#!/vendor/bin/sh

#for fifo
/system/bin/mkfifo     /dev/testfifo
/system/bin/chmod  777 /dev/testfifo

#for screen timemout
log -t QHDebug "QH ready to settings screen_off_timeout"
/system/bin/cmd settings put system screen_off_timeout 2147483647

while [ true ]
do
        bootComplete=$(getprop dev.bootcomplete)
        if [ $bootComplete = 1 ] ; then
                processid=$(/system/bin/ps -elf | grep installd | grep -v grep |  /system/bin/awk '{print $2}')
                log -t QHDebug "get installd process id = ${processid}"
                setprop vendor.test.installd.pid ${processid}
                break;
        else
                sleep 3
        fi
done